<?php 
require_once ("../../../../init.php");

$roletype =  HttpSession::get('roletype');
 
$data = array();

$superadmin = new stdClass();
$superadmin->value = '0';
$superadmin->text = '系统超级管理员';

$topadmin = new stdClass();
$topadmin->value = '1';
$topadmin->text = '企业顶级管理员';

$companyadmin = new stdClass();
$companyadmin->value = '2';
$companyadmin->text = '企业二级管理员';


switch ($roletype) {
  case '0':
    $data[] =  $superadmin;
    $data[] = $topadmin;
    break;
  case '1':
    // $data[] = $topadmin;
    $data[] =  $companyadmin;
    break;
}

$arr['totalCount']= count($data);
$arr['data']    = $data;
echo json_encode($arr);
?>
